!function(){"use strict";var e={7385:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EcommerceIntegration=t.ANALYTICS_ADDED_PAYMENT=t.ANALYTICS_PERFORMED_SEARCH=t.ANALYTICS_STARTED_ORDER=t.ANALYTICS_COMPLETED_ORDER=t.ANALYTICS_ADDED_PRODUCT=t.ANALYTICS_VIEWED_PRODUCT_CATEGORY=t.ANALYTICS_VIEWED_PRODUCT=t.ANALYTICS_PAGE_VIEW=t.ANALYTICS_GENERIC_EVENT=void 0;var i=n(997),a=n(542),c=n(6997),s=n(1102),u=n(372),p=n(1930),d={viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductVariant:/^[ _]?viewed[ _]?product[ _]?variant[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,performedSearch:/^[ _]?performed[ _]?search[ _]?$/i,addedPayment:/^[ _]?added[ _]?payment[ _]?$/i};t.ANALYTICS_GENERIC_EVENT="genericEvent",t.ANALYTICS_PAGE_VIEW="pageView",t.ANALYTICS_VIEWED_PRODUCT="viewedProduct",t.ANALYTICS_VIEWED_PRODUCT_CATEGORY="viewedProductCategory",t.ANALYTICS_ADDED_PRODUCT="addedProduct",t.ANALYTICS_COMPLETED_ORDER="completedOrder",t.ANALYTICS_STARTED_ORDER="startedOrder",t.ANALYTICS_PERFORMED_SEARCH="performedSearch",t.ANALYTICS_ADDED_PAYMENT="addedPayment";var v=function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i.shopId=void 0,i.checkoutToken=void 0,i.visitToken=void 0,i.uniqueToken=void 0,i.appName=void 0,i.wrapTrack(),o&&(i.shopId=o.shopId,i.appName=o.appName,i.checkoutToken=o.checkoutToken,i.visitToken=o.visitToken,i.uniqueToken=o.uniqToken),i.setPixelStub(),i.ensureTrackingConsent((function(){i.initialize(r)}),r),i}return o(t,e),t.prototype.ensureTrackingConsent=function(e,t){c.privacyApiMethods.userCanBeTracked()?e():(document.addEventListener(a.TrackingConsentEvents.TRACKING_ACCEPTED,e),t())},t.prototype.wrapTrack=function(){var e=this.track;this.track=function(t){var n=t.event,r=!1;for(var o in d){var i=d[o];if(this[o]&&i.test(n)){this[o].apply(this,[t]),r=!0;break}}r||e.apply(this,Array.prototype.slice.call(arguments))}},t.prototype.addMonorailBatchEvent=function(e){if(this.appName&&this.appName in p.appNameToEcommerceEventSchemaId){var t=this.getEcommercePixelIds();i.addBatchEvent({schemaId:e.schemaId?e.schemaId:p.appNameToEcommerceEventSchemaId[this.appName],payload:s.objectAssignFilterUndefined({shop_id:this.shopId,partner_name:this.getEcommerceMetricsTag(),event_name:e.eventName,unique_token:this.uniqueToken,visit_token:this.visitToken,integration_id:this.getIntegrationId()},{pixel_id:t&&t.length>0?t[0]:void 0,event_properties:e.eventProperties,checkout_token:this.checkoutToken,event_id:e.eventId})})}},t}(u.Integration);t.EcommerceIntegration=v},372:function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.length)return n.substr(t.length)}},793:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingConsentEvents=void 0,(t.TrackingConsentEvents||(t.TrackingConsentEvents={})).TRACKING_ACCEPTED="trackingConsentAccepted"},5291:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingRegulations=void 0,(n=t.TrackingRegulations||(t.TrackingRegulations={})).GDPR="GDPR",n.CCPA="CCPA",n.NO_VALUE=""},542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TrackingRegulations=t.TrackingConsentEvents=void 0;var r=n(793);Object.defineProperty(t,"TrackingConsentEvents",{enumerable:!0,get:function(){return r.TrackingConsentEvents}});var o=n(5291);Object.defineProperty(t,"TrackingRegulations",{enumerable:!0,get:function(){return o.TrackingRegulations}})},8878:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&(s.lineNumber=p[1],s.columnNumber=p[2],parseInt(s.lineNumber,10)>1e5))return}this.sendBugsnagXhr(n,u,s,c,o,i,e.appConfig,e.notes)}}},997:function(e,t){var n=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t>>0;try{t=performance.now()>>>0}catch(e){t=0}var n=Math.abs(e+t).toString(16).toLowerCase();return"00000000".substr(0,8-n.length)+n}t.UniqueIdManager=c,t.buildToken=s,t.hexTime=u},1102:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.canonical=t.generateShopifyDValue=t.objectAssignFilterUndefined=void 0;var r=n(1503),o=/^https?:\/\//;t.objectAssignFilterUndefined=function(e,t){for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e},t.generateShopifyDValue=function(){return(new Date).toJSON()},t.canonical=function(){for(var e=r.virtualDocument().getElementsByTagName("link"),t=0;t0?null===(a=null==p?void 0:p.variants[0])||void 0===a?void 0:a.id:void 0,l=(null===(u=null===(s=window.ShopifyAnalytics)||void 0===s?void 0:s.meta)||void 0===u?void 0:u.selectedVariantId)||d,f={schemaId:v.buyWithPrimePresenceSchemaId,payload:r(r(r({shop_id:o},e.data&&{event_message:e.data}),p&&{product_id:p.id}),l&&{product_variant_id:Number(l)})};c.produce([f])}}catch(e){h.reportError("buyWithPrimeError",e)}}))},e.prototype.getNavigationType=function(){try{var e="PerformanceNavigationTiming",t=l.getNavigationTypeExperimental();return t||(t=l.getNavigationTypeLegacy(),e="performance.navigation"),t?{navigationType:t,navigationApi:e}:{navigationType:"unknown",navigationApi:"unknown"}}catch(e){p.reportError("navigation_api_error",e)}return{navigationType:"error",navigationApi:"error"}},e.prototype.initialize=function(e,t,n){var r=this;this.trekkie=new o.Trekkie(t.Trekkie,(function(){setTimeout((function(){r.loadIntegrations(e,t,r.trekkie,n)}),0)})),this.integrations[0]!==this.trekkie&&this.integrations.unshift(this.trekkie),this.setupEventIdMapping()},e.prototype.setupEventIdMapping=function(){var e;try{if(this.config.initialDocumentCookie){var t=u.parseDocumentCookie(this.config.initialDocumentCookie)._shopify_evids;if((null===(e=this.config.Trekkie)||void 0===e?void 0:e.expectS2SEventId)&&t)if(window.ShopifyAnalytics&&window.ShopifyAnalytics.meta&&window.ShopifyAnalytics.meta.evids)for(var n=0,r=t.split(";");n0?e:e+a.search();var t=a.href(),n=t.indexOf("#");return-1===n?t:t.slice(0,n)},e}();t.Tricorder=y,t.replayAnalyticsQueue=function(e,t){for(var n=0,r=t;n